花點篇幅將 Day 24 到 Day 29 的文章做一下整理,為 CentOS Stream 安裝 LAMP 環境做個整理:
L:CentOS Stream
A:Apache (httpd)
$ sudo yum install httpd -y
$ sudo systemctl start httpd mod_ssl
$ sudo systemctl enable httpd
$ sudo firewall-cmd --add-service=http --add-service=https --permanent
$ sudo firewall-cmd --reload
M:MySQL
$ sudo yum module install mysql -y
$ sudo system start mysqld
$ sudo systemctl enable mysqld
$ sudo mysql_secure_installation
P:PHP
$ sudo yum install epel-release -y
$ sudo yum-config-manager enable PowerTools
$ sudo yum install <https://rpms.remirepo.net/enterprise/remi-release-8.rpm> -y
$ sudo yum module install php:remi-7.3 -y
應用程式網站
安裝 phpMyAdmin
$ sudo yum install php-mysqlnd -y
$ sudo yum --enablerepo=remi install phpmyadmin -y
$ sudo systemctl restart httpd
安裝 mkcert、建立本地 CA、產生自簽憑證
(詳細內容,請見 https://github.com/FiloSottile/mkcert)
$ sudo yum install git -y
$ sh -c "$(curl -fsSL <https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh>)"
$ sudo yum install nss-tools -y
$ /home/linuxbrew/.linuxbrew/bin/brew install mkcert
$ /home/linuxbrew/.linuxbrew/Cellar/mkcert/1.4.0/bin/mkcert -install
$ /home/linuxbrew/.linuxbrew/Cellar/mkcert/1.4.0/bin/mkcert localhost
安裝 WordPress
安裝 Laravel